import { EntitySchema } from '@mikro-orm/core';

export class ImsYzdKpExpressRule {
  id!: number;
  uniacid!: number;
  name!: string;
  detail!: unknown;
  type!: boolean;
  isDefault!: boolean;
  addTime!: string;
  updateTime!: string;
}

export const ImsYzdKpExpressRuleSchema = new EntitySchema({
  class: ImsYzdKpExpressRule,
  properties: {
    id: { primary: true, type: 'number' },
    uniacid: { type: 'number', index: 'uniacid' },
    name: { type: 'string', length: 255 },
    detail: { type: 'unknown', columnType: 'longtext' },
    type: { type: 'boolean' },
    isDefault: { type: 'boolean' },
    addTime: { type: 'string', length: 255 },
    updateTime: { type: 'string', length: 255 },
  },
});
